package bb.lanxing.util.upgrade;

import com.tencent.upgrade.callback.Logger;

import bb.lanxing.util.Log;

public class ShiplyLogger implements Logger {

    private static final boolean saveLogToFile = false;
    private final String TAG_PREFIX = "SLogger_";

    @Override
    public void v(String tag, String msg) {
        Log.v(TAG_PREFIX + tag, msg);
    }

    @Override
    public void v(String tag, String msg, Throwable throwable) {
        android.util.Log.v(TAG_PREFIX + tag, msg, throwable);
        if (saveLogToFile) {
            Log.v(TAG_PREFIX + tag, msg);
        }

    }

    @Override
    public void d(String tag, String msg) {
        Log.d(TAG_PREFIX + tag, msg);
    }

    @Override
    public void d(String tag, String msg, Throwable throwable) {
        android.util.Log.d(TAG_PREFIX + tag, msg, throwable);
        if (saveLogToFile) {
            Log.d(TAG_PREFIX + tag, msg);
        }
    }

    @Override
    public void i(String tag, String msg) {
        Log.i(TAG_PREFIX + tag, msg);
    }

    @Override
    public void i(String tag, String msg, Throwable throwable) {
        android.util.Log.i(TAG_PREFIX + tag, msg, throwable);
        if (saveLogToFile) {
            Log.i(TAG_PREFIX + tag, msg);
        }
    }

    @Override
    public void w(String tag, String msg) {
        Log.w(TAG_PREFIX + tag, msg);
    }

    @Override
    public void w(String tag, String msg, Throwable throwable) {
        android.util.Log.w(TAG_PREFIX + tag, msg, throwable);
        if (saveLogToFile) {
            Log.w(TAG_PREFIX + tag, msg);
        }
    }

    @Override
    public void e(String tag, String msg) {
        Log.e(TAG_PREFIX + tag, msg);
    }

    @Override
    public void e(String tag, String msg, Throwable throwable) {
        Log.e(TAG_PREFIX + tag, msg, throwable);
    }
}
